import zhRequest from '@/service'
import { IData } from '@/service/types'

export function getPageListData(url: string, queryInfo: any) {
  return zhRequest.post<IData>({
    url: url,
    data: queryInfo
  })
}
// url: /user/id
export function deletePageData(url: string) {
  return zhRequest.delete<IData>({
    url: url
  })
}
export function createPageData(url: string, newData: any) {
  return zhRequest.post<IData>({
    url: url,
    data: newData
  })
}
export function editPageData(url: string, editData: any) {
  return zhRequest.patch<IData>({
    url: url,
    data: editData
  })
}
